Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace return with terminate #2742

Merged
merged 3 commits into from
Jan 27, 2025
Merged

Conversation

maxtremblay
Copy link
Contributor

@maxtremblay maxtremblay commented Jan 24, 2025

This is the counterpart of tracel-ai/cubecl#449.

The support for return was unintuitive, so I replace it with a terminate!() macro that terminates the execution of the current unit within the kernel.

Copy link

codecov bot commented Jan 25, 2025

Codecov Report

Attention: Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.

Project coverage is 83.57%. Comparing base (7ddb5af) to head (9559372).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...rates/burn-jit/src/kernel/quantization/quantize.rs 0.00% 5 Missing ⚠️
crates/burn-jit/src/kernel/binary.rs 0.00% 2 Missing ⚠️
crates/burn-jit/src/kernel/binary_int.rs 0.00% 2 Missing ⚠️
crates/burn-jit/src/kernel/comparison.rs 0.00% 2 Missing ⚠️
...tes/burn-jit/src/kernel/conv/conv2d/layout_swap.rs 0.00% 2 Missing ⚠️
...urn-jit/src/kernel/conv/deform_conv_transpose2d.rs 0.00% 2 Missing ⚠️
crates/burn-jit/src/kernel/mask/mask_fill.rs 0.00% 2 Missing ⚠️
crates/burn-jit/src/kernel/mask/mask_where.rs 0.00% 2 Missing ⚠️
...tes/burn-jit/src/kernel/quantization/dequantize.rs 0.00% 2 Missing ⚠️
crates/burn-jit/src/kernel/cast/base.rs 0.00% 1 Missing ⚠️
... and 22 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2742      +/-   ##
==========================================
- Coverage   83.58%   83.57%   -0.01%     
==========================================
  Files         824      824              
  Lines      108340   108453     +113     
==========================================
+ Hits        90553    90639      +86     
- Misses      17787    17814      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

One tiny formatting line to fix, but pre-approving

crates/burn-jit/src/kernel/conv/conv2d/col2im.rs Outdated Show resolved Hide resolved
@maxtremblay maxtremblay merged commit 29c383b into main Jan 27, 2025
11 checks passed
@maxtremblay maxtremblay deleted the replace-return-with-terminate branch January 27, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants